package com.hb.drawpoint;

public final class ShaderCode {
    public final static String VERTEX =
                    "uniform mat4 u_Matrix;" +

            "attribute vec4 a_Position;" +
                    "attribute vec4 a_Color;" +
                    "attribute float a_PointSize;" +

                    "varying vec4 v_Color;" +

                    "void main()" +
                    "{" +
                    "    gl_Position =  u_Matrix * a_Position;" +
                    "    gl_PointSize = a_PointSize;" +
                    "    v_Color = a_Color;" +
                    "}";
    public final static String FRAGMENT =
            "precision mediump float;" +
                    "varying vec4 v_Color;" +

                    "void main()" +
                    "{" +
                    "  float d = distance(gl_PointCoord, vec2(0.5, 0.5));" +
                    "  if(d < 0.5) " +
                    "   {gl_FragColor = v_Color;} " +
                    "  else { discard; }" +
                    "}";
}
